package main

import "sync"

// 只支持 int 即可。

type MyMap struct {
	a map[interface{}]interface{}
	lock sync.RWMutex
}

func (m *MyMap) Load(key interface{}) (value interface{}, ok bool) {
	m.lock.Lock()
	defer m.lock.Unlock()
	if m.a[key] != nil {
		return m.a[key], true
	}
	return nil, false
}

func (m *MyMap) Store(key, value interface{}) {
}

func (m *MyMap) Delete(key interface{}) {

}

func (m *MyMap) LoadOrStore(key, value interface{}) (actual interface{}, loaded bool) {
	return nil, false
}

func (m *MyMap) LoadAndDelete(key interface{}) (value interface{}, loaded bool) {
	return nil, false
}

func main() {}
